﻿@using FL.SiteEntity;
@using FL.Common;
@using FL.Bussiness.Site;
@{
    var isLogin = (Session["User"] == null);
    int pagesize = Model.pagesize;
    string code = Model.code;
    string type = Model.type;
    IList<v_t_site_article> list = BArticle.CreateInstance().GetVArticleList(code, "", pagesize, 1);
}

@if (list != null)
{

    if (type != "single_row")
    {
        foreach (v_t_site_article article in list)
        {
            <div class="row">
                <div class="col-lg-4">
                    <p class="contentList"><a href="">@article.title</a></p>
                </div>
            </div>
            <div class="row" style="margin-top:5px;">
                <div class="col-lg-12">
                    <p class="contentCent"><a href="/Article/ArticleView?id=@article.id">@article.zhaiyao</a></p>
                    <p class="contenticon">
                        <span class="fl"><img src="/images/img/calendar.png" alt=""></span><span class="Spanmar">@article.add_time</span>
                        <span class="fl"><img src="/images/img/message.png" alt=""></span><span class="Spanmar">@article.read_count 人评论&nbsp;&nbsp;&nbsp;&nbsp;</span>
                        <span class="fl"><img src="/images/img/eyes.png" alt=""></span><span class="Spanmar">@article.read_count 次浏览</span>
                    </p>
                </div>
            </div>
        }
    }
    else
    {
        int index = 0;
        <ul style="margin-top:35px;margin-left:-30px;">
            @foreach (v_t_site_article article in list)
            {
                index = index + 1;
                <li style="list-style:none;padding-top:5px;margin-top:5px;">
                    <div style="float:right">@article.add_time.ToShortDateString().Substring(5)</div><span class="num" style="background:#0094ff;color:#fff;width:14px;text-align:center;border:1px solid #ccc;">&nbsp;@index </span><a href="/Article/ArticleView?id=@article.id" title="@article.title">@(article.title.Length < 18 ? article.title : article.title.Substring(0, 18))...</a>
                </li>
            }
        </ul>
    }
}
